Deprecate GdkColor
authorMatthias Clasen <mclasen@redhat.com>
Thu, 22 May 2014 13:05:58 +0000 (09:05 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 22 May 2014 13:09:55 +0000 (09:09 -0400)
It has been replaced by GdkRGBA. Time to make it official.
http://bugzilla.gnome.org/show_bug.cgi?id=636695

30 files changed:
demos/gtk-demo/iconview_edit.c
gdk/Makefile.am
gdk/deprecated/gdkcolor.c [new file with mode: 0644]
gdk/deprecated/gdkcolor.h [new file with mode: 0644]
gdk/gdk.h
gdk/gdkcairo.h
gdk/gdkcolor.c [deleted file]
gdk/gdkcolor.h [deleted file]
gdk/gdkevents.h
gtk/gtkbuilder.c
gtk/gtkcellrenderer.c
gtk/gtkcellrenderertext.c
gtk/gtkcellview.c
gtk/gtkcolorbutton.c
gtk/gtkcsscustomproperty.c
gtk/gtkcssstylefuncs.c
gtk/gtkiconview.c
gtk/gtklabel.c
gtk/gtkmodifierstyle.c
gtk/gtksettings.c
gtk/gtkstylecontext.c
gtk/gtktextattributes.c
gtk/gtktextbufferserialize.c
gtk/gtktextdisplay.c
gtk/gtktextlayout.c
gtk/gtktexttag.c
gtk/gtktextview.c
gtk/gtktreeview.c
gtk/gtkwidget.c
gtk/inspector/prop-editor.c

index 0487e5274acdf2008df723f6eacd44111a85fb98..25bc80f02d73fd5e995f99bb2ce4c523b255a1fd 100644 (file)
@@ -52,20 +52,24 @@ set_cell_color (GtkCellLayout   *cell_layout,
                 gpointer         data)
 {
   gchar *text;
-  GdkColor color;
+  GdkRGBA color;
   guint32 pixel = 0;
   GdkPixbuf *pixbuf;
 
   gtk_tree_model_get (tree_model, iter, COL_TEXT, &text, -1);
-  if (gdk_color_parse (text, &color))
+  if (!text)
+    return;
+
+  if (gdk_rgba_parse (&color, text))
     pixel =
-      (color.red   >> 8) << 24 |
-      (color.green >> 8) << 16 |
-      (color.blue  >> 8) << 8;
+      ((gint)(color.red * 255)) << 24 |
+      ((gint)(color.green * 255)) << 16 |
+      ((gint)(color.blue  * 255)) << 8 |
+      ((gint)(color.alpha * 255));
 
   g_free (text);
 
-  pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, 24, 24);
+  pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, 24, 24);
   gdk_pixbuf_fill (pixbuf, pixel);
 
   g_object_set (cell, "pixbuf", pixbuf, NULL);
index ed4540c3105742a0a551387b94411344371cd506..c9fd11d0bbcc4113d678bee498399e21e9b91f88 100644 (file)
@@ -62,11 +62,11 @@ LDADD =                                     \
 #
 # GDK header files for public installation (non-generated)
 #
+#
 gdk_public_h_sources =                                 \
        gdk.h                                   \
        gdkapplaunchcontext.h                   \
        gdkcairo.h                              \
-       gdkcolor.h                              \
        gdkcursor.h                             \
        gdkdevice.h                             \
        gdkdevicemanager.h                      \
@@ -94,6 +94,13 @@ gdk_public_h_sources =                               \
        gdkvisual.h                             \
        gdkwindow.h
 
+deprecated_h_sources =                         \
+       deprecated/gdkcolor.h
+
+gdk_h_sources =                                        \
+       $(gdk_public_h_sources)                 \
+       $(deprecated_h_sources)
+
 gdk_private_headers =                          \
        gdkapplaunchcontextprivate.h            \
        gdkcursorprivate.h                      \
@@ -111,11 +118,14 @@ gdk_private_headers =                             \
        gdkvisualprivate.h                      \
        gdkx.h
 
+deprecated_c_sources =                         \
+       deprecated/gdkcolor.c
+
 gdk_c_sources =                                \
+       $(deprecated_c_sources)                 \
        gdk.c                                   \
        gdkapplaunchcontext.c                   \
        gdkcairo.c                              \
-       gdkcolor.c                              \
        gdkcursor.c                             \
        gdkdeprecated.c                         \
        gdkdevice.c                             \
@@ -157,6 +167,9 @@ gdkincludedir = $(includedir)/gtk-3.0/gdk
 gdkinclude_HEADERS = $(gdk_public_h_sources) gdkenumtypes.h gdkversionmacros.h
 nodist_gdkinclude_HEADERS = gdkconfig.h
 
+deprecatedincludedir = $(includedir)/gtk-3.0/gdk/deprecated
+deprecatedinclude_HEADERS = $(deprecated_h_sources)
+
 common_sources =               \
        $(gdk_private_headers)  \
        $(gdk_c_sources)        \
@@ -196,7 +209,7 @@ endif
 if HAVE_INTROSPECTION
 
 introspection_files =          \
-       $(filter-out gdkkeysyms-compat.h, $(gdk_public_h_sources))      \
+       $(filter-out gdkkeysyms-compat.h, $(gdk_h_sources))     \
        $(gdk_c_sources)        \
         gdkenumtypes.c         \
         gdkenumtypes.h
@@ -378,15 +391,15 @@ BUILT_SOURCES = \
 
 gdkenumtypes.h: stamp-gdkenumtypes.h
        @true
-stamp-gdkenumtypes.h: $(gdk_public_h_sources) gdkenumtypes.h.template
+stamp-gdkenumtypes.h: $(gdk_h_sources) gdkenumtypes.h.template
        $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) --template gdkenumtypes.h.template \
-               $(gdk_public_h_sources) ) >> xgen-geth \
+               $(gdk_h_sources) ) >> xgen-geth \
        && (cmp -s xgen-geth gdkenumtypes.h || cp xgen-geth gdkenumtypes.h ) \
        && rm -f xgen-geth \
        && echo timestamp > $(@F)
-gdkenumtypes.c: $(gdk_public_h_sources) gdkenumtypes.c.template
+gdkenumtypes.c: $(gdk_h_sources) gdkenumtypes.c.template
        $(AM_V_GEN) ( cd $(srcdir) && $(GLIB_MKENUMS) --template gdkenumtypes.c.template \
-               $(gdk_public_h_sources) ) > xgen-getc \
+               $(gdk_h_sources) ) > xgen-getc \
        && cp xgen-getc gdkenumtypes.c  \
        && rm -f xgen-getc
 
diff --git a/gdk/deprecated/gdkcolor.c b/gdk/deprecated/gdkcolor.c
new file mode 100644 (file)
index 0000000..fb45a87
--- /dev/null
@@ -0,0 +1,202 @@
+/* GDK - The GIMP Drawing Kit
+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
+ * file for a list of people on the GTK+ Team.  See the ChangeLog
+ * files for a list of changes.  These files are distributed with
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
+ */
+
+#include "config.h"
+
+#include "gdkcolor.h"
+
+#include "gdkscreen.h"
+#include "gdkinternals.h"
+
+#include <time.h>
+
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
+/**
+ * SECTION:colors
+ * @Short_description: Manipulation of colors
+ * @Title: Colors
+ *
+ * A #GdkColor represents a color.
+ *
+ * When working with cairo, it is often more convenient
+ * to use a #GdkRGBA instead, and #GdkColor has been
+ * deprecated in favor of #GdkRGBA.
+ */
+
+
+/**
+ * gdk_color_copy:
+ * @color: a #GdkColor
+ *
+ * Makes a copy of a #GdkColor.
+ *
+ * The result must be freed using gdk_color_free().
+ *
+ * Returns: a copy of @color
+ *
+ * Deprecated: 3.14: Use #GdkRGBA
+ */
+GdkColor*
+gdk_color_copy (const GdkColor *color)
+{
+  GdkColor *new_color;
+
+  g_return_val_if_fail (color != NULL, NULL);
+
+  new_color = g_slice_new (GdkColor);
+  *new_color = *color;
+  return new_color;
+}
+
+/**
+ * gdk_color_free:
+ * @color: a #GdkColor
+ *
+ * Frees a #GdkColor created with gdk_color_copy().
+ *
+ * Deprecated: 3.14: Use #GdkRGBA
+ */
+void
+gdk_color_free (GdkColor *color)
+{
+  g_return_if_fail (color != NULL);
+
+  g_slice_free (GdkColor, color);
+}
+
+/**
+ * gdk_color_hash:
+ * @color: a #GdkColor
+ *
+ * A hash function suitable for using for a hash
+ * table that stores #GdkColors.
+ *
+ * Returns: The hash function applied to @color
+ *
+ * Deprecated: 3.14: Use #GdkRGBA
+ */
+guint
+gdk_color_hash (const GdkColor *color)
+{
+  return ((color->red) +
+          (color->green << 11) +
+          (color->blue << 22) +
+          (color->blue >> 6));
+}
+
+/**
+ * gdk_color_equal:
+ * @colora: a #GdkColor
+ * @colorb: another #GdkColor
+ *
+ * Compares two colors.
+ *
+ * Returns: %TRUE if the two colors compare equal
+ *
+ * Deprecated: 3.14: Use #GdkRGBA
+ */
+gboolean
+gdk_color_equal (const GdkColor *colora,
+                 const GdkColor *colorb)
+{
+  g_return_val_if_fail (colora != NULL, FALSE);
+  g_return_val_if_fail (colorb != NULL, FALSE);
+
+  return ((colora->red == colorb->red) &&
+          (colora->green == colorb->green) &&
+          (colora->blue == colorb->blue));
+}
+
+G_DEFINE_BOXED_TYPE (GdkColor, gdk_color,
+                     gdk_color_copy,
+                     gdk_color_free)
+
+/**
+ * gdk_color_parse:
+ * @spec: the string specifying the color
+ * @color: (out): the #GdkColor to fill in
+ *
+ * Parses a textual specification of a color and fill in the
+ * @red, @green, and @blue fields of a #GdkColor.
+ *
+ * The string can either one of a large set of standard names
+ * (taken from the X11 `rgb.txt` file), or it can be a hexadecimal
+ * value in the form “\#rgb” “\#rrggbb”, “\#rrrgggbbb” or
+ * “\#rrrrggggbbbb” where “r”, “g” and “b” are hex digits of
+ * the red, green, and blue components of the color, respectively.
+ * (White in the four forms is “\#fff”, “\#ffffff”, “\#fffffffff”
+ * and “\#ffffffffffff”).
+ *
+ * Returns: %TRUE if the parsing succeeded
+ *
+ * Deprecated: 3.14: Use #GdkRGBA
+ */
+gboolean
+gdk_color_parse (const gchar *spec,
+                 GdkColor    *color)
+{
+  PangoColor pango_color;
+
+  if (pango_color_parse (&pango_color, spec))
+    {
+      color->red = pango_color.red;
+      color->green = pango_color.green;
+      color->blue = pango_color.blue;
+
+      return TRUE;
+    }
+  else
+    return FALSE;
+}
+
+/**
+ * gdk_color_to_string:
+ * @color: a #GdkColor
+ *
+ * Returns a textual specification of @color in the hexadecimal
+ * form “\#rrrrggggbbbb” where “r”, “g” and “b” are hex digits
+ * representing the red, green and blue components respectively.
+ *
+ * The returned string can be parsed by gdk_color_parse().
+ *
+ * Returns: a newly-allocated text string
+ *
+ * Since: 2.12
+ *
+ * Deprecated: 3.14: Use #GdkRGBA
+ */
+gchar *
+gdk_color_to_string (const GdkColor *color)
+{
+  PangoColor pango_color;
+
+  g_return_val_if_fail (color != NULL, NULL);
+
+  pango_color.red = color->red;
+  pango_color.green = color->green;
+  pango_color.blue = color->blue;
+
+  return pango_color_to_string (&pango_color);
+}
diff --git a/gdk/deprecated/gdkcolor.h b/gdk/deprecated/gdkcolor.h
new file mode 100644 (file)
index 0000000..0be61c4
--- /dev/null
@@ -0,0 +1,85 @@
+/* GDK - The GIMP Drawing Kit
+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+ * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
+ * file for a list of people on the GTK+ Team.  See the ChangeLog
+ * files for a list of changes.  These files are distributed with
+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
+ */
+
+#ifndef __GDK_COLOR_H__
+#define __GDK_COLOR_H__
+
+#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdk.h> can be included directly."
+#endif
+
+#include <cairo.h>
+#include <gdk/gdktypes.h>
+#include <gdk/gdkversionmacros.h>
+
+G_BEGIN_DECLS
+
+
+/**
+ * GdkColor:
+ * @pixel: For allocated colors, the pixel value used to
+ *     draw this color on the screen. Not used anymore.
+ * @red: The red component of the color. This is
+ *     a value between 0 and 65535, with 65535 indicating
+ *     full intensity
+ * @green: The green component of the color
+ * @blue: The blue component of the color
+ *
+ * A #GdkColor is used to describe a color,
+ * similar to the XColor struct used in the X11 drawing API.
+ */
+struct _GdkColor
+{
+  guint32 pixel;
+  guint16 red;
+  guint16 green;
+  guint16 blue;
+};
+
+#define GDK_TYPE_COLOR (gdk_color_get_type ())
+
+GDK_DEPRECATED_IN_3_14
+GType     gdk_color_get_type (void) G_GNUC_CONST;
+
+GDK_DEPRECATED_IN_3_14
+GdkColor *gdk_color_copy      (const GdkColor *color);
+GDK_DEPRECATED_IN_3_14
+void      gdk_color_free      (GdkColor       *color);
+
+GDK_DEPRECATED_IN_3_14
+guint     gdk_color_hash      (const GdkColor *color);
+GDK_DEPRECATED_IN_3_14
+gboolean  gdk_color_equal     (const GdkColor *colora,
+                               const GdkColor *colorb);
+
+GDK_DEPRECATED_IN_3_14
+gboolean  gdk_color_parse     (const gchar    *spec,
+                               GdkColor       *color);
+GDK_DEPRECATED_IN_3_14
+gchar *   gdk_color_to_string (const GdkColor *color);
+
+
+G_END_DECLS
+
+#endif /* __GDK_COLOR_H__ */
index 36d5c3b55d91a3e261a6265fe67c3557a3ac1c6a..5761fa1db5e9a91c4dd92194d26b6661b20e428e 100644 (file)
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -31,7 +31,6 @@
 #include <gdk/gdkversionmacros.h>
 #include <gdk/gdkapplaunchcontext.h>
 #include <gdk/gdkcairo.h>
-#include <gdk/gdkcolor.h>
 #include <gdk/gdkcursor.h>
 #include <gdk/gdkdevice.h>
 #include <gdk/gdkdevicemanager.h>
 #include <gdk/gdkvisual.h>
 #include <gdk/gdkwindow.h>
 
+#ifndef GDK_DISABLE_DEPRECATED
+#include <gdk/deprecated/gdkcolor.h>
+#endif
+
 #undef __GDK_H_INSIDE__
 
 #endif /* __GDK_H__ */
index a311d8e15c831f2603c88dc7e8f92db4437b47a0..bc9ee97a6b3c043170ce013fc0fb90f7de4906df 100644 (file)
@@ -23,7 +23,7 @@
 #endif
 
 #include <gdk/gdkversionmacros.h>
-#include <gdk/gdkcolor.h>
+#include <gdk/deprecated/gdkcolor.h>
 #include <gdk/gdkrgba.h>
 #include <gdk/gdkpixbuf.h>
 #include <pango/pangocairo.h>
diff --git a/gdk/gdkcolor.c b/gdk/gdkcolor.c
deleted file mode 100644 (file)
index 43d0d91..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
- * file for a list of people on the GTK+ Team.  See the ChangeLog
- * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
- */
-
-#include "config.h"
-
-#include "gdkcolor.h"
-
-#include "gdkscreen.h"
-#include "gdkinternals.h"
-
-#include <time.h>
-
-/**
- * SECTION:colors
- * @Short_description: Manipulation of colors
- * @Title: Colors
- *
- * A #GdkColor represents a color.
- *
- * When working with cairo, it is often more convenient
- * to use a #GdkRGBA instead.
- */
-
-
-/**
- * gdk_color_copy:
- * @color: a #GdkColor
- *
- * Makes a copy of a #GdkColor.
- *
- * The result must be freed using gdk_color_free().
- *
- * Returns: a copy of @color
- */
-GdkColor*
-gdk_color_copy (const GdkColor *color)
-{
-  GdkColor *new_color;
-
-  g_return_val_if_fail (color != NULL, NULL);
-
-  new_color = g_slice_new (GdkColor);
-  *new_color = *color;
-  return new_color;
-}
-
-/**
- * gdk_color_free:
- * @color: a #GdkColor
- *
- * Frees a #GdkColor created with gdk_color_copy().
- */
-void
-gdk_color_free (GdkColor *color)
-{
-  g_return_if_fail (color != NULL);
-
-  g_slice_free (GdkColor, color);
-}
-
-/**
- * gdk_color_hash:
- * @color: a #GdkColor
- *
- * A hash function suitable for using for a hash
- * table that stores #GdkColors.
- *
- * Returns: The hash function applied to @color
- */
-guint
-gdk_color_hash (const GdkColor *color)
-{
-  return ((color->red) +
-          (color->green << 11) +
-          (color->blue << 22) +
-          (color->blue >> 6));
-}
-
-/**
- * gdk_color_equal:
- * @colora: a #GdkColor
- * @colorb: another #GdkColor
- *
- * Compares two colors.
- *
- * Returns: %TRUE if the two colors compare equal
- */
-gboolean
-gdk_color_equal (const GdkColor *colora,
-                 const GdkColor *colorb)
-{
-  g_return_val_if_fail (colora != NULL, FALSE);
-  g_return_val_if_fail (colorb != NULL, FALSE);
-
-  return ((colora->red == colorb->red) &&
-          (colora->green == colorb->green) &&
-          (colora->blue == colorb->blue));
-}
-
-G_DEFINE_BOXED_TYPE (GdkColor, gdk_color,
-                     gdk_color_copy,
-                     gdk_color_free)
-
-/**
- * gdk_color_parse:
- * @spec: the string specifying the color
- * @color: (out): the #GdkColor to fill in
- *
- * Parses a textual specification of a color and fill in the
- * @red, @green, and @blue fields of a #GdkColor.
- *
- * The string can either one of a large set of standard names
- * (taken from the X11 `rgb.txt` file), or it can be a hexadecimal
- * value in the form “\#rgb” “\#rrggbb”, “\#rrrgggbbb” or
- * “\#rrrrggggbbbb” where “r”, “g” and “b” are hex digits of
- * the red, green, and blue components of the color, respectively.
- * (White in the four forms is “\#fff”, “\#ffffff”, “\#fffffffff”
- * and “\#ffffffffffff”).
- *
- * Returns: %TRUE if the parsing succeeded
- */
-gboolean
-gdk_color_parse (const gchar *spec,
-                 GdkColor    *color)
-{
-  PangoColor pango_color;
-
-  if (pango_color_parse (&pango_color, spec))
-    {
-      color->red = pango_color.red;
-      color->green = pango_color.green;
-      color->blue = pango_color.blue;
-
-      return TRUE;
-    }
-  else
-    return FALSE;
-}
-
-/**
- * gdk_color_to_string:
- * @color: a #GdkColor
- *
- * Returns a textual specification of @color in the hexadecimal
- * form “\#rrrrggggbbbb” where “r”, “g” and “b” are hex digits
- * representing the red, green and blue components respectively.
- *
- * The returned string can be parsed by gdk_color_parse().
- *
- * Returns: a newly-allocated text string
- *
- * Since: 2.12
- */
-gchar *
-gdk_color_to_string (const GdkColor *color)
-{
-  PangoColor pango_color;
-
-  g_return_val_if_fail (color != NULL, NULL);
-
-  pango_color.red = color->red;
-  pango_color.green = color->green;
-  pango_color.blue = color->blue;
-
-  return pango_color_to_string (&pango_color);
-}
diff --git a/gdk/gdkcolor.h b/gdk/gdkcolor.h
deleted file mode 100644 (file)
index 2744b24..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/* GDK - The GIMP Drawing Kit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/*
- * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
- * file for a list of people on the GTK+ Team.  See the ChangeLog
- * files for a list of changes.  These files are distributed with
- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
- */
-
-#ifndef __GDK_COLOR_H__
-#define __GDK_COLOR_H__
-
-#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
-#error "Only <gdk/gdk.h> can be included directly."
-#endif
-
-#include <cairo.h>
-#include <gdk/gdktypes.h>
-#include <gdk/gdkversionmacros.h>
-
-G_BEGIN_DECLS
-
-
-/**
- * GdkColor:
- * @pixel: For allocated colors, the pixel value used to
- *     draw this color on the screen. Not used anymore.
- * @red: The red component of the color. This is
- *     a value between 0 and 65535, with 65535 indicating
- *     full intensity
- * @green: The green component of the color
- * @blue: The blue component of the color
- *
- * A #GdkColor is used to describe a color,
- * similar to the XColor struct used in the X11 drawing API.
- */
-struct _GdkColor
-{
-  guint32 pixel;
-  guint16 red;
-  guint16 green;
-  guint16 blue;
-};
-
-#define GDK_TYPE_COLOR (gdk_color_get_type ())
-
-GDK_AVAILABLE_IN_ALL
-GType     gdk_color_get_type (void) G_GNUC_CONST;
-
-GDK_AVAILABLE_IN_ALL
-GdkColor *gdk_color_copy      (const GdkColor *color);
-GDK_AVAILABLE_IN_ALL
-void      gdk_color_free      (GdkColor       *color);
-
-GDK_AVAILABLE_IN_ALL
-guint     gdk_color_hash      (const GdkColor *color);
-GDK_AVAILABLE_IN_ALL
-gboolean  gdk_color_equal     (const GdkColor *colora,
-                               const GdkColor *colorb);
-
-GDK_AVAILABLE_IN_ALL
-gboolean  gdk_color_parse     (const gchar    *spec,
-                               GdkColor       *color);
-GDK_AVAILABLE_IN_ALL
-gchar *   gdk_color_to_string (const GdkColor *color);
-
-
-G_END_DECLS
-
-#endif /* __GDK_COLOR_H__ */
index 2af1419b8decf6d296482a32d949dcbfe66fde6a..71316b4c58c0ad7ea4bfd3805f19396e8f0d73af 100644 (file)
@@ -30,7 +30,6 @@
 #endif
 
 #include <gdk/gdkversionmacros.h>
-#include <gdk/gdkcolor.h>
 #include <gdk/gdktypes.h>
 #include <gdk/gdkdnd.h>
 #include <gdk/gdkdevice.h>
index 165e9e5269b28e0cd946cd9dd04c25849e0a2213..f6e5c52e4fd1611db5c00f359840d0327e4c0fb2 100644 (file)
  * as %FALSE), enumerations (can be specified by their name, nick or
  * integer value), flags (can be specified by their name, nick, integer
  * value, optionally combined with “|”, e.g. “GTK_VISIBLE|GTK_REALIZED”)
- * and colors (in a format understood by gdk_color_parse()). Pixbufs can
+ * and colors (in a format understood by gdk_rgba_parse()). Pixbufs can
  * be specified as a filename of an image file to load. Objects can be
  * referred to by their name and by default refer to objects declared
  * in the local xml fragment and objects exposed via
@@ -1977,10 +1977,11 @@ gtk_builder_value_from_string_type (GtkBuilder   *builder,
       }
       break;
     case G_TYPE_BOXED:
-      if (G_VALUE_HOLDS (value, GDK_TYPE_COLOR))
+      if (G_VALUE_HOLDS (value, g_type_from_name ("GdkColor")))
         {
           GdkColor color = { 0, };
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
           if (gdk_color_parse (string, &color))
             g_value_set_boxed (value, &color);
           else
@@ -1992,6 +1993,7 @@ gtk_builder_value_from_string_type (GtkBuilder   *builder,
                           string);
               ret = FALSE;
             }
+G_GNUC_END_IGNORE_DEPRECATIONS
         }
       else if (G_VALUE_HOLDS (value, GDK_TYPE_RGBA))
         {
index 67b6909e708f45468b262fd9ca6f284e93473307..d36977901149e9b491497de8cef286fd730fb51c 100644 (file)
@@ -395,6 +395,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
    *
    * Deprecated: 3.4: Use #GtkCellRenderer:cell-background-rgba instead.
    */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   g_object_class_install_property (object_class,
                                   PROP_CELL_BACKGROUND_GDK,
                                   g_param_spec_boxed ("cell-background-gdk",
@@ -402,6 +403,7 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
                                                       P_("Cell background color as a GdkColor"),
                                                       GDK_TYPE_COLOR,
                                                       GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
+G_GNUC_END_IGNORE_DEPRECATIONS
   /**
    * GtkCellRenderer:cell-background-rgba:
    *
index fc17b38014e81b8322f6c9babf0b6fa6d687227a..6402b4be916e14bb4c5da587bc494b817e94479a 100644 (file)
@@ -295,6 +295,7 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
    *
    * Deprecated: 3.4: Use #GtkCellRendererText:background-rgba instead.
    */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   g_object_class_install_property (object_class,
                                    PROP_BACKGROUND_GDK,
                                    g_param_spec_boxed ("background-gdk",
@@ -302,6 +303,7 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
                                                        P_("Background color as a GdkColor"),
                                                        GDK_TYPE_COLOR,
                                                        GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   /**
    * GtkCellRendererText:background-rgba:
@@ -332,6 +334,7 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
    *
    * Deprecated: 3.4: Use #GtkCellRendererText:foreground-rgba instead.
    */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   g_object_class_install_property (object_class,
                                    PROP_FOREGROUND_GDK,
                                    g_param_spec_boxed ("foreground-gdk",
@@ -339,6 +342,7 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
                                                        P_("Foreground color as a GdkColor"),
                                                        GDK_TYPE_COLOR,
                                                        GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   /**
    * GtkCellRendererText:foreground-rgba:
index 5870f1031f20c5eb25be7c4b3f9a422abe60ca1b..d554dd89409500c6517e880bb501183c9b372580 100644 (file)
@@ -199,6 +199,7 @@ gtk_cell_view_class_init (GtkCellViewClass *klass)
    *
    * Deprecated: 3.4: Use #GtkCellView:background-rgba instead.
    */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   g_object_class_install_property (gobject_class,
                                    PROP_BACKGROUND_GDK,
                                    g_param_spec_boxed ("background-gdk",
@@ -206,6 +207,7 @@ gtk_cell_view_class_init (GtkCellViewClass *klass)
                                                       P_("Background color as a GdkColor"),
                                                       GDK_TYPE_COLOR,
                                                       GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
+G_GNUC_END_IGNORE_DEPRECATIONS
   /**
    * GtkCellView:background-rgba:
    *
index 661c5c6fc3a9e2e0443ed61da95c338a538a7f17..00bbc8772925827eb10530ac2063d1966ebcff64 100644 (file)
@@ -197,6 +197,7 @@ gtk_color_button_class_init (GtkColorButtonClass *klass)
    *
    * Deprecated: 3.4: Use #GtkColorButton:rgba instead.
    */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   g_object_class_install_property (gobject_class,
                                    PROP_COLOR,
                                    g_param_spec_boxed ("color",
@@ -204,6 +205,7 @@ gtk_color_button_class_init (GtkColorButtonClass *klass)
                                                        P_("The selected color"),
                                                        GDK_TYPE_COLOR,
                                                        GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   /**
    * GtkColorButton:alpha:
index 31e516bd77580244ad336d11e31c3db96b706208..0fecddb84c47ed5b3286eae671894b348541d73c 100644 (file)
@@ -151,11 +151,13 @@ gtk_css_custom_property_create_initial_value (GParamSpec *pspec)
       gdk_rgba_parse (&color, "pink");
       g_value_set_boxed (&value, &color);
     }
-  else if (pspec->value_type == GDK_TYPE_COLOR)
+  else if (pspec->value_type == g_type_from_name ("GdkColor"))
     {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       GdkColor color;
       gdk_color_parse ("pink", &color);
       g_value_set_boxed (&value, &color);
+G_GNUC_END_IGNORE_DEPRECATIONS
     }
   else if (pspec->value_type == GTK_TYPE_BORDER)
     {
index 9bb5406b310aecab7f977bd8aafef8a396ba7a37..8b5393a79b567ef3d05a714ddf83ae84f184d526 100644 (file)
@@ -272,7 +272,9 @@ color_value_print (const GValue *value,
     g_string_append (string, "none");
   else
     {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       char *s = gdk_color_to_string (color);
+G_GNUC_END_IGNORE_DEPRECATIONS
       g_string_append (string, s);
       g_free (s);
     }
@@ -976,13 +978,14 @@ gtk_css_style_funcs_init (void)
                                 rgba_value_parse,
                                 rgba_value_print,
                                 rgba_value_compute);
+
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
+
   register_conversion_function (GDK_TYPE_COLOR,
                                 color_value_parse,
                                 color_value_print,
                                 color_value_compute);
 
-  G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
-
   register_conversion_function (GTK_TYPE_SYMBOLIC_COLOR,
                                 symbolic_color_value_parse,
                                 symbolic_color_value_print,
index 4cd36b912d1a987d23692f52db2c97a5db168e11..f428612eab87578c4f1141bde494122405d5851b 100644 (file)
@@ -669,7 +669,7 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
                                            g_param_spec_boxed ("selection-box-color",
                                                                P_("Selection Box Color"),
                                                                P_("Color of the selection box"),
-                                                               GDK_TYPE_COLOR,
+                                                               g_type_from_name ("GdkColor"),
                                                                GTK_PARAM_READABLE));
 
   gtk_widget_class_install_style_property (widget_class,
index 0e722650cf113e3f86e2d32328bc043fa3d4be12..b3ed08300609b9ee5ff38acf3ae2bd186ec56b96 100644 (file)
@@ -1375,9 +1375,11 @@ attribute_from_text (GtkBuilder   *builder,
        }
       break;
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
       /* PangoAttrColor */
     case PANGO_ATTR_FOREGROUND:
-      if (gtk_builder_value_from_string_type (builder, GDK_TYPE_COLOR, 
+      if (gtk_builder_value_from_string_type (builder, GDK_TYPE_COLOR,
                                              value, &val, error))
        {
          color = g_value_get_boxed (&val);
@@ -1408,6 +1410,8 @@ attribute_from_text (GtkBuilder   *builder,
          attribute = pango_attr_strikethrough_color_new (color->red, color->green, color->blue);
        }
       break;
+
+G_GNUC_END_IGNORE_DEPRECATIONS
       
       /* PangoAttrShape */
     case PANGO_ATTR_SHAPE:
index 88cd0d5905ee7d60bceef8e9ac5ce1ccb437a7dd..247292f952a2fc8d1e3010bf3a5f3a07f7190059 100644 (file)
@@ -90,10 +90,14 @@ gtk_modifier_style_get_style_property (GtkStyleProvider *provider,
   GdkColor color;
   gchar *str;
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
   /* Reject non-color types for now */
   if (pspec->value_type != GDK_TYPE_COLOR)
     return FALSE;
 
+G_GNUC_END_IGNORE_DEPRECATIONS
+
   priv = GTK_MODIFIER_STYLE (provider)->priv;
   str = g_strdup_printf ("-%s-%s",
                          g_type_name (pspec->owner_type),
index dd4666288fd9379622eba2cd1c44c60661373ab5..7a70e79bce51ef9e1f014f4b28b6748666ae1095 100644 (file)
@@ -1837,9 +1837,7 @@ gtk_settings_get_property (GObject     *object,
   switch (property_id)
     {
     case PROP_COLOR_HASH:
-      g_value_take_boxed (value,
-                          g_hash_table_new_full (g_str_hash, g_str_equal,
-                                                 g_free, (GDestroyNotify) gdk_color_free));
+      g_value_take_boxed (value, g_hash_table_new (g_str_hash, g_str_equal));
       return;
     default: ;
     }
@@ -1851,7 +1849,7 @@ gtk_settings_get_property (GObject     *object,
   if ((g_value_type_transformable (G_TYPE_INT, value_type) &&
        !(fundamental_type == G_TYPE_ENUM || fundamental_type == G_TYPE_FLAGS)) ||
       g_value_type_transformable (G_TYPE_STRING, G_VALUE_TYPE (value)) ||
-      g_value_type_transformable (GDK_TYPE_COLOR, G_VALUE_TYPE (value)))
+      g_value_type_transformable (GDK_TYPE_RGBA, G_VALUE_TYPE (value)))
     {
       if (priv->property_values[property_id - 1].source == GTK_SETTINGS_SOURCE_APPLICATION ||
           !gdk_screen_get_setting (priv->screen, pspec->name, value))
@@ -2151,7 +2149,7 @@ settings_install_property_parser (GtkSettingsClass   *class,
 GtkRcPropertyParser
 _gtk_rc_property_parser_from_type (GType type)
 {
-  if (type == GDK_TYPE_COLOR)
+  if (type == g_type_from_name ("GdkColor"))
     return gtk_rc_property_parse_color;
   else if (type == GTK_TYPE_REQUISITION)
     return gtk_rc_property_parse_requisition;
index ebdc2435851f73b3d80ea1376dd47647e2638690..a93b1ac8b98829ead53bc191881784376a07307a 100644 (file)
@@ -3638,7 +3638,9 @@ get_cursor_color (GtkStyleContext *context,
       color->blue = style_color->blue / 65535.0;
       color->alpha = 1;
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       gdk_color_free (style_color);
+G_GNUC_END_IGNORE_DEPRECATIONS
     }
   else
     {
index a5dd897effd23419dad55183aab40c07104f48bd..5998bd398ce25f54132bcfa1c75f452c968a5526 100644 (file)
@@ -128,8 +128,10 @@ gtk_text_attributes_copy_values (GtkTextAttributes *src,
   if (dest->font)
     pango_font_description_free (dest->font);
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   if (dest->pg_bg_color)
     gdk_color_free (dest->pg_bg_color);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   if (dest->pg_bg_rgba)
     gdk_rgba_free (dest->pg_bg_rgba);
@@ -153,8 +155,10 @@ gtk_text_attributes_copy_values (GtkTextAttributes *src,
   if (src->font)
     dest->font = pango_font_description_copy (src->font);
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   if (src->pg_bg_color)
     dest->pg_bg_color = gdk_color_copy (src->pg_bg_color);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   if (src->pg_bg_rgba)
     dest->pg_bg_rgba = gdk_rgba_copy (src->pg_bg_rgba);
@@ -209,8 +213,10 @@ gtk_text_attributes_unref (GtkTextAttributes *values)
       if (values->font)
        pango_font_description_free (values->font);
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       if (values->pg_bg_color)
        gdk_color_free (values->pg_bg_color);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
       if (values->pg_bg_rgba)
        gdk_rgba_free (values->pg_bg_rgba);
@@ -280,15 +286,19 @@ _gtk_text_attributes_fill_from_tags (GtkTextAttributes *dest,
 
          if (dest->pg_bg_color)
            {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
              gdk_color_free (dest->pg_bg_color);
              dest->pg_bg_color = NULL;
+G_GNUC_END_IGNORE_DEPRECATIONS
            }
 
          if (vals->pg_bg_rgba)
            dest->pg_bg_rgba = gdk_rgba_copy (vals->pg_bg_rgba);
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
          if (vals->pg_bg_color)
            dest->pg_bg_color = gdk_color_copy (vals->pg_bg_color);
+G_GNUC_END_IGNORE_DEPRECATIONS
         }
 
       if (vals->font)
index 3976e1f27d8eaff0069407d67f1c355c6c59d460..3b7707419252f6d0f4a534c70e1182e7705cc9d2 100644 (file)
@@ -50,6 +50,7 @@ typedef struct
 static gchar *
 serialize_value (GValue *value)
 {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   if (g_value_type_transformable (value->g_type, G_TYPE_STRING))
     {
       GValue text_value = G_VALUE_INIT;
@@ -73,6 +74,7 @@ serialize_value (GValue *value)
     {
       g_warning ("Type %s is not serializable\n", g_type_name (value->g_type));
     }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   return NULL;
 }
@@ -81,6 +83,7 @@ static gboolean
 deserialize_value (const gchar *str,
                    GValue      *value)
 {
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   if (g_value_type_transformable (G_TYPE_STRING, value->g_type))
     {
       GValue text_value = G_VALUE_INIT;
@@ -191,6 +194,7 @@ deserialize_value (const gchar *str,
     {
       g_warning ("Type %s can not be deserialized\n", g_type_name (value->g_type));
     }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   return FALSE;
 }
index 24cc0ec6b4850970c08c3b46f341184232b7b328..9e8fceac5bbfd2078bb4d381c006d8c422a9960c 100644 (file)
@@ -224,7 +224,9 @@ gtk_text_renderer_prepare_run (PangoRenderer  *renderer,
              rgba.green = color->green / 65535.;
              rgba.blue = color->blue / 65535.;
              rgba.alpha = 1;
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
              gdk_color_free (color);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
              text_renderer->error_color = gdk_rgba_copy (&rgba);
            }
index 4ad0aee3ae15c719a06df370cca32dbb0058a508..99909288f04e145948313c2f447c9f3209c19497 100644 (file)
@@ -1400,10 +1400,12 @@ set_para_values (GtkTextLayout      *layout,
 
   display->total_width = MAX (layout->screen_width, layout->width) - display->left_margin - display->right_margin;
   
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   if (style->pg_bg_color)
     display->pg_bg_color = gdk_color_copy (style->pg_bg_color);
   else
     display->pg_bg_color = NULL;
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   if (style->pg_bg_rgba)
     display->pg_bg_rgba = gdk_rgba_copy (style->pg_bg_rgba);
@@ -2497,8 +2499,10 @@ gtk_text_layout_free_line_display (GtkTextLayout      *layout,
       if (display->cursors)
         g_array_free (display->cursors, TRUE);
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       if (display->pg_bg_color)
         gdk_color_free (display->pg_bg_color);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
       if (display->pg_bg_rgba)
         gdk_rgba_free (display->pg_bg_rgba);
index 4510872c516dc179af0a5d875749066e6fae143b..6e16fd6689251ab26e132c21a2de12c374a57366 100644 (file)
@@ -218,7 +218,7 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
                                    g_param_spec_boxed ("background-gdk",
                                                        P_("Background color"),
                                                        P_("Background color as a GdkColor"),
-                                                       GDK_TYPE_COLOR,
+                                                       g_type_from_name ("GdkColor"),
                                                        GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
 
   /**
@@ -264,7 +264,7 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
                                    g_param_spec_boxed ("foreground-gdk",
                                                        P_("Foreground color"),
                                                        P_("Foreground color as a GdkColor"),
-                                                       GDK_TYPE_COLOR,
+                                                       g_type_from_name ("GdkColor"),
                                                        GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
 
   /**
@@ -581,7 +581,7 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
                                    g_param_spec_boxed ("paragraph-background-gdk",
                                                        P_("Paragraph background color"),
                                                        P_("Paragraph background color as a GdkColor"),
-                                                       GDK_TYPE_COLOR,
+                                                       g_type_from_name ("GdkColor"),
                                                        GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
 
   /**
@@ -890,8 +890,10 @@ set_pg_bg_rgba (GtkTextTag *tag, GdkRGBA *rgba)
   if (priv->values->pg_bg_rgba)
     gdk_rgba_free (priv->values->pg_bg_rgba);
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   if (priv->values->pg_bg_color)
     gdk_color_free (priv->values->pg_bg_color);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   priv->values->pg_bg_rgba = NULL;
   priv->values->pg_bg_color = NULL;
@@ -909,7 +911,9 @@ set_pg_bg_rgba (GtkTextTag *tag, GdkRGBA *rgba)
       priv->values->pg_bg_rgba = gdk_rgba_copy (rgba);
 
       copy_rgba_to_gdk_color (rgba, &color);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       priv->values->pg_bg_color = gdk_color_copy (&color);
+G_GNUC_END_IGNORE_DEPRECATIONS
     }
   else
     {
index 9a709a40e3100231efd3eef348c409f57e06a33a..8431e3f1c80e63b5242127d6a7dbab3d2dff0b6d 100644 (file)
@@ -911,12 +911,14 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
   /*
    * Style properties
    */
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_widget_class_install_style_property (widget_class,
                                           g_param_spec_boxed ("error-underline-color",
                                                               P_("Error underline color"),
                                                               P_("Color with which to draw error-indication underlines"),
                                                               GDK_TYPE_COLOR,
                                                               GTK_PARAM_READABLE));
+G_GNUC_END_IGNORE_DEPRECATIONS
   
   /*
    * Signals
index a401cc5f60e594e2f4929d64d53a18dcd81b9973..c0e855d16c654e0bb562325564597bd5e34b608d 100644 (file)
@@ -1226,7 +1226,7 @@ gtk_tree_view_class_init (GtkTreeViewClass *class)
                                                                 P_("Make the expanders indented"),
                                                                 TRUE,
                                                                 GTK_PARAM_READABLE));
-
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_widget_class_install_style_property (widget_class,
                                            g_param_spec_boxed ("even-row-color",
                                                                P_("Even Row Color"),
@@ -1240,6 +1240,7 @@ gtk_tree_view_class_init (GtkTreeViewClass *class)
                                                                P_("Color to use for odd rows"),
                                                               GDK_TYPE_COLOR,
                                                               GTK_PARAM_READABLE));
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   gtk_widget_class_install_style_property (widget_class,
                                           g_param_spec_int ("grid-line-width",
index fd702646595b34fed4016ef4fd9f71e371ee96b9..d5cc921a662d127209a815c138b779edcda01371 100644 (file)
@@ -3499,6 +3499,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
                                                             P_("Width, in pixels, between focus indicator and the widget 'box'"),
                                                             0, G_MAXINT, 1,
                                                             GTK_PARAM_READABLE | G_PARAM_DEPRECATED));
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   gtk_widget_class_install_style_property (klass,
                                           g_param_spec_boxed ("cursor-color",
                                                               P_("Cursor color"),
@@ -3511,6 +3512,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
                                                               P_("Color with which to draw the secondary insertion cursor when editing mixed right-to-left and left-to-right text"),
                                                               GDK_TYPE_COLOR,
                                                               GTK_PARAM_READABLE));
+G_GNUC_END_IGNORE_DEPRECATIONS
   gtk_widget_class_install_style_property (klass,
                                           g_param_spec_float ("cursor-aspect-ratio",
                                                               P_("Cursor line aspect ratio"),
@@ -3525,6 +3527,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
                                                                  FALSE,
                                                                  GTK_PARAM_READABLE));
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
   /**
    * GtkWidget:link-color:
    *
@@ -3540,7 +3543,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
                                                               P_("Unvisited Link Color"),
                                                               P_("Color of unvisited links"),
                                                               GDK_TYPE_COLOR,
-                                                              GTK_PARAM_READABLE));
+                                                              GTK_PARAM_READABLE|G_PARAM_DEPRECATED));
 
   /**
    * GtkWidget:visited-link-color:
@@ -3557,7 +3560,8 @@ G_GNUC_END_IGNORE_DEPRECATIONS
                                                               P_("Visited Link Color"),
                                                               P_("Color of visited links"),
                                                               GDK_TYPE_COLOR,
-                                                              GTK_PARAM_READABLE));
+                                                              GTK_PARAM_READABLE|G_PARAM_DEPRECATED));
+G_GNUC_END_IGNORE_DEPRECATIONS
 
   /**
    * GtkWidget:wide-separators:
index 91562b47931e31e9a0bcb71f3efa1979b044a201..2ec345646e55c52f1fc8fb81f6d751fa3baea5e1 100644 (file)
@@ -696,6 +696,7 @@ color_modified (GtkColorButton *cb, GParamSpec *ignored, ObjectProperty *p)
   g_value_unset (&val);
 }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 static void
 color_changed (GObject *object, GParamSpec *pspec, gpointer data)
 {
@@ -721,6 +722,7 @@ color_changed (GObject *object, GParamSpec *pspec, gpointer data)
 
   g_value_unset (&val);
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 static void
 font_modified (GtkFontChooser *fb, GParamSpec *pspec, ObjectProperty *p)
@@ -1005,7 +1007,7 @@ property_widget (GObject                *object,
                           object, spec, G_CALLBACK (rgba_modified));
     }
   else if (type == G_TYPE_PARAM_BOXED &&
-           G_PARAM_SPEC_VALUE_TYPE (spec) == GDK_TYPE_COLOR)
+           G_PARAM_SPEC_VALUE_TYPE (spec) == g_type_from_name ("GdkColor"))
     {
       prop_edit = gtk_color_chooser_widget_new ();
       gtk_color_chooser_set_use_alpha (GTK_COLOR_CHOOSER (prop_edit), FALSE);